package com.nononsenseapps.feeder.net.fever.model

import com.nononsenseapps.feeder.db.entity.Feed
import com.squareup.moshi.JsonClass
import java.util.*

@JsonClass(generateAdapter = true)
data class FeverFeed(val id:Int,
                     val favicon_id:Int,
                     val title:String,
                     val url:String,
                     val site_url:String,
                     val is_spark:Boolean,
                     val last_updated_on_time: Date
                     ){
    constructor(feed:Feed):this(
        id=feed.id.toInt(),
        favicon_id=0,
        title=feed.title,
        url= feed.url.toString(),
        site_url=feed.url.toString(),
        is_spark=false,
        last_updated_on_time=feed.lastSuccessSyncTime.toDate()
    )
}
